package bz.yfw.example.s3blazeds.part2.view
{
	import bz.yfw.example.s3blazeds.part2.view.state.EmpSearchViewState;
	
	import spark.components.Button;
	import spark.components.Label;
	import spark.components.RadioButton;
	import spark.components.RadioButtonGroup;
	import spark.components.TextInput;
	import spark.components.View;
	
	/**
	 * 社員検索条件View
	 * @author tokufxug http://twitter.com/tokufxug
	 */ 
	public class EmpSearchView extends View
	{
		[SkinPart]
		public var txtinptName:TextInput;
		
		[SkinPart]
		public var rdbtnMan:RadioButton;
		
		[SkinPart]
		public var rdbtnWoman:RadioButton;
		
		[SkinPart]
		public var rdbStaff:RadioButton;
		
		[SkinPart]
		public var rdbChief:RadioButton;
		
		[SkinPart]
		public var rdbManager:RadioButton;
		
		[SkinPart]
		public var rdbGManager:RadioButton;
		
		[SkinPart]
		public var txtinptEnterCompanyFromY:TextInput;
		
		[SkinPart]
		public var txtinptEnterCompanyFromM:TextInput;
		
		[SkinPart]
		public var txtinptEnterCompanyFromD:TextInput;
		
		[SkinPart]
		public var txtinptEnterCompanyToY:TextInput;
		
		[SkinPart]
		public var txtinptEnterCompanyToM:TextInput;
		
		[SkinPart]
		public var txtinptEnterCompanyToD:TextInput;
		
		[SkinPart]
		public var btnSearch:Button;
		
		public var rdbgrpSex:RadioButtonGroup;
		
		public var rdbgrpPosition:RadioButtonGroup;
		
		private var requiredCurrentState:String;
		
		public function EmpSearchView() {
			super.title = "検索条件";
			rdbgrpSex = new RadioButtonGroup();
			rdbgrpPosition = new RadioButtonGroup();
		}
		
		protected override function getCurrentSkinState():String{
			if (requiredCurrentState == null) {
				return EmpSearchViewState.NORMAL_STATE;
			}
			return requiredCurrentState;
		}
	}
}